package com.liuche.homechat.common.common.constant;

public interface RedisKeyConstant {
    /**
     * 统一前缀
     */
    String BASE_KEY = "homechat:";
    String USER_LOGIN_KEY = "user:uid_%d";
    /**
     * 在线用户列表
     */
    String ONLINE_UID_ZET = "online";




    String OFFLINE_UID_ZET = "offline";




    String HOT_ROOM_ZET = "hotRoom";




    String USER_INFO_STRING = "userInfo:uid_%d";




    String ROOM_INFO_STRING = "roomInfo:roomId_%d";




    String GROUP_INFO_STRING = "groupInfo:roomId_%d";




    String GROUP_FRIEND_STRING = "groupFriend:roomId_%d";




    String USER_TOKEN_STRING = "userToken:uid_%d";




    String USER_MODIFY_STRING = "userModify:uid_%d";




    String USER_SUMMARY_STRING = "userSummary:uid_%d";




    String USER_CHAT_NUM = "useChatGPTNum:uid_%d";

    String USER_CHAT_CONTEXT = "useChatGPTContext:uid_%d_roomId_%d";




    String OPEN_ID_STRING = "openid:%s";





    String USER_GLM2_TIME_LAST = "userGLM2UseTime:uid_%d";

    /**
     * 统一返回 redis-key
     * @param key
     * @param objs
     * @return
     */
    static String getKey(String key, Object... objs) {
        return String.format(BASE_KEY + key, objs);
    }
}
